<div class="full_w">
	<div class="h_title">Edit Sản Phẩm</div>
<?php if(!is_null($msg)){ echo $msg;}?>

<?php echo form_open_multipart('admin/products/editProduct/'.$data->sanpham_Id)?>
<div> <?php echo validation_errors(); ?></div>
<table width="80%" style="margin: auto" cellpadding="3" cellspacing="3">
<tr>
	<tr>
		<td>Tên</td>
		<td><input type="text" name="productName" value="<?php echo $data->sanpham_Ten ?>" size="50" /></td>
	</tr>
	<tr>
		<td>Giá</td>
		<td><input type="text" name="productPrice" value="<?php echo $data->sanpham_Gia ?>" size="50" /></td>
	</tr>

	<tr> 
		<td> Hình Ảnh</td>
		<td><input type="file" name="img" /></td>
	</tr>

	<tr> 
		<td> Loại</td>
		<td>
			<select name="productType">
				<?php foreach ($dataTypeProducts as $type ) {
					if($type['tp_Id'] == $data->sanpham_Loai) {
					?>
						<option selected value='<?php echo $type['tp_Id'] ?>'><?php echo $type['tp_Type'] ?></option>
					<?php		
						} else
					?>
						<option value='<?php echo $type['tp_Id'] ?>'><?php echo $type['tp_Type'] ?></option>
				<?php } 
				?>
			</select>
		</td>
	</tr>
	
	<tr>
		<td>Từ Khóa</td>
		<td><input type="text" name="productKeyWord" value="<?php echo $data->sanpham_KeyWord ?>"  size="50" /></td>
	</tr>

	<tr> 
		<td colspan="2"> <textarea class="ckeditor" name="editor1"><?php echo $data->sanpham_ChiTiet ?></textarea></td>
	</tr>
	<tr> 
		<td></td>
		<td><button type="submit" class="add" name='save'>Lưu lại</button></td>
	</tr>

</table>
</div>